/*
 脚本功能：商店
 */

var a = 0;
var icon = "#fUI/UIWindow/Quest/icon2/7#";
var ttt = "#fUI/UIWindow/Quest/icon2/7#";//"+ttt+"//美化1
var jzs2 = "#fUI/GuildMark.img/Mark/Animal/00002002/15#";//家族小兔子
var xxx = "#fEffect/CharacterEff/1082565/2/0#"; //星系
var ob1 = "#fEffect/SetEff/102/effect/7#";//PPMS鸟右
var ob2 = "#fEffect/SetEff/102/effect/7#";//PPMS鸟左
var F114 = "#fUI/NameTag.img/157/w#";//小兔子戒指头部、
var ob14 = "#fUI/UIWindow2.img/Item/timeLimit/0#";//小闹钟
var ob8 = "#fUI/UIWindow2.img/AdditionalOptionTooltip/epic#";//小紫色按钮a
var ob9 = "#fUI/UIWindow2.img/AdditionalOptionTooltip/rare#";//小紫色按钮b
var ob10 = "#fUI/UIWindow2.img/AdditionalOptionTooltip/unique#";//小紫色按钮s
var ob11 = "#fUI/UIWindow2.img/AdditionalOptionTooltip/legendary#";//小紫色按钮ss
var 幽灵1 = "#fEffect/ItemEff.img/1004738/effect/default/3";//幽灵右边
var 幽灵2 = "#fEffect/ItemEff.img/1004738/effect/ladder/0";//幽灵左边
var Pb = "#fEffect/EliteMobEff.img/eliteGradeEffect_change/0/effect_head/11";//品客斌
var Pw = "#fEffect/SetEff.img/64/backgrnd/20";//雪人
var Pi = "#fEffect/SetEff.img/127/backgrnd2/9";//后街男孩
var Pe = "#fEffect/SetEff.img/216/effect/11";//燃烧猩红时钟
var Pa = "#fEffect/SetEff.img/72/backgrnd/30";//机器宠物萝卜的特效显示屏
var Pn = "#fEffect/OnUserEff.img/demian/incStack/4";//黛米安logo特效
var Po = "#fEffect/OnUserEff.img/blackHeaven/androidPre/6";//机器人打架
function start() {
    a = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 1)
            a++;
        else
            a--;
        if (a == -1) {
            cm.dispose();
        } else if (a == 0) {
            cm.sendSimple("           "+Po+"\r\n"+"#r#e  " +  "#b#n\r\n#L0# "+"#v1122122#"+"#b#e冒险之心强化升级 - #d<#r免费强化·#b免费获取#d>#l \r\n\r\n#L1# "+"#v1032219#"+"#e#r神话耳环强化升级 - #d<#r免费强化·#b免费获取#d>#l\r\n\r\n#L2# "+"#v1132298#"+"#b#e绝对腰带强化升级 - #d<#r免费强化·#b免费获取#d>\r\n\r\n#L3# "+"#v1082489#"+"#r#e次元手套强化升级 - #d<#r免费强化·#b免费获取#d>#l\r\n\r\n#L4# "+"#v1012174#"+"#b#e鬼娃面具强化升级 - #d<#r免费强化·#b免费获取#d>#l\r\n\r\n")
        } else if (a == 1) {
            if (selection == 0){
			    cm.dispose();
                cm.openNpc(9000064, "冒险之心列表");//冒险之心升级强化
            }else if (selection == 1) {//防具商店
			    cm.dispose();
                cm.openNpc(9000062, "神话耳环列表");//神话耳环升级
		    }else if (selection == 2) {//
			    cm.dispose();
                cm.openNpc(9000039, "绝对腰带列表");//抵用
		    }else if (selection == 3) {//微积分
			    cm.dispose();
                cm.openNpc(9000065, "次元手套列表");//
		    }else if (selection == 4) {//pk热力值
			    cm.dispose();
                cm.openNpc(2470044, "鬼娃娃强化列表");//
            } else {
                // 1012123 杂货商店 x
                //10 低级防具
                //11 50~60级防具
                //12 60~70级防具
                //20 低级武器
                //21 50~60级武器
                //22 60~70级武器
                // 3 其他道具 
                // 4 卷轴商店 x 
                // 1012125 宠物商店
                // 6 辅助武器
                cm.openShop(selection);
                cm.dispose();
            }
        } else if (a == 2) {
            switch (selection) {
                case 0://低级防具
                    //cm.openShop(10)
                    cm.sendOk("暂时未开放。")
                    break;
                case 1://50~60级防具
                    cm.openShop(11)
                    break;
                case 2://60~70级防具
                    cm.openShop(12)
                    break;
                case 3://低级武器
                    //cm.openShop(20)
                    cm.sendOk("暂时未开放。")
                    break;
                case 4://50~60级武器
                    cm.openShop(21)
                    break;
                case 5://60~70级武器
                    cm.openShop(22)
                    break;
            }
            cm.dispose();
        }//a
    }//mode
}//f